<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>vue</title>
</head>
<body >
    <div id="app">
        <input type="text" v-model="count"><button type="button" v-on:click="addCount()">点赞</button>
        hello {{name}}，有{{count}}个用户为他点赞
    </div>
    

    
</body>

<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<script>
    let vue = new Vue({
        el:"#app",
        data:{
            name:"zhangsan",
            count:1
        },
        methods:{
            addCount:function(){
                this.count  = this.count+1
            }
        }
    })

</script>
</html>